package com.jeesite.modules.jdProduct.web;


import com.jeesite.common.cache.JedisUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "${frontPath}/SynchronousToken")
public class SynchronousToken {

    @PostMapping(value = "token")
    public String token(String token){
        try{
            JedisUtils.set("token",token,0);
            return "{\"success\":true,\"resultMessage\":\"保存成功\"}";
        }catch (Exception e){
            return "{\"success\":false,\"resultMessage\":\"保存异常\"}";
        }
    }
}
